<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
<rich:panel header="#{messages['create.membership.category']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>

	<h:panelGrid width="100%">
		<h:outputText value="#{messages['membership.category.info']}" styleClass="sub_header" />
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>

	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="code" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="code" value="#{messages['membership.category.code']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="code" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.code}"></t:inputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="name" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="name" value="#{messages['membership.category.name']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="name" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.name}"></t:inputText>
		</h:panelGroup>
		
	</t:panelGrid>
	
	
	
	<h:panelGrid width="100%">
		<h:outputText value="#{messages['membership.category.term.info']}" styleClass="sub_header" />
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="term" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="term" value="#{messages['credit.term']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="term" styleClass="standardText" value="#{adminMembershipCategoryBean.termId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminMembershipCategoryBean.termList}"/>
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="transferable" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="transferable" value="#{messages['transferable']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneRadio id="transferable" styleClass="standardText" value="#{adminMembershipCategoryBean.trans}" required="true">
				<f:selectItems value="#{adminMembershipCategoryBean.yeNoList}"/>
				<a4j:support ajaxSingle="true" reRender="trans" event="onclick"></a4j:support>
			</t:selectOneRadio>
		</h:panelGroup>
		
		</t:panelGrid>
		<t:panelGrid id="trans" columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText rendered="#{adminMembershipCategoryBean.check}"></h:outputText>
		<t:message rendered="#{adminMembershipCategoryBean.check}" for="transferablefee" styleClass="error" ></t:message>
	
		<h:panelGroup rendered="#{adminMembershipCategoryBean.check}" >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="transferablefee" value="#{messages['transfer.fee']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup rendered="#{adminMembershipCategoryBean.check}" >
			<t:inputText id="transferablefee" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.transferableFeeDbl}">
				<f:convertNumber pattern="##,###,##0.00"/>
			</t:inputText>
		</h:panelGroup>
		</t:panelGrid>
		<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="dependantlimit" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="dependantlimit" value="#{messages['dependant.limit']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="dependantlimit" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.dependantLimitInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="nomineelimit" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="nomineelimit" value="#{messages['nominee.limit']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="nomineelimit" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.nomineeLimitInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="noofreins" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noofreins" value="#{messages['number.of.reinstatement']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="noofreins" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.noOfreInsInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="reinstatefeetrx" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="reinstatefeetrx" value="#{messages['reinstate.fee.trx']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="reinstatefeetrx" styleClass="standardText" value="#{adminMembershipCategoryBean.resId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminMembershipCategoryBean.resList}"/>
			</t:selectOneMenu>
		</h:panelGroup>
		
		
		
		<h:outputText></h:outputText>
		<t:message for="freericfee" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="freericfee" value="#{messages['free.ric.fee']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="freericfee" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.freeRciFeeInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText styleClass="standardText_Label" value="#{messages['years']}"></h:outputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="maxinstallmentmonth" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="maxinstallmentmonth" value="#{messages['maximum.installment.month']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="maxinstallmentmonth" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.maxInstallmentMonthInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText styleClass="standardText_Label" value="#{messages['months']}"></h:outputText>
		</h:panelGroup>
		
		
		<h:outputText></h:outputText>
		<t:message for="accruedvacation" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="accruedvacation" value="#{messages['accrued.vacation']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="accruedvacation" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.accruedVacationInt}">
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText styleClass="standardText_Label" value="#{messages['years']}"></h:outputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="advancevacationpercent" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="advancevacationpercent" value="#{messages['advance.vacation.percent']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="advancevacationpercent" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminMembershipCategoryBean.category.advanceVacationPercentDbl}">
				<f:convertNumber pattern="##0.0"/>
				<f:validateLength maximum="100" minimum="0"/>
			</t:inputText>
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText styleClass="standardText_Label" value="#{messages['percent']}"></h:outputText>
		</h:panelGroup>
		
		
	</t:panelGrid>
	
	
	
	<rich:spacer height="30"></rich:spacer>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:panelGrid columns="2">
			<h:commandButton value="#{messages['create']}" styleClass="button" action="#{adminMembershipCategoryBean.createAction}"></h:commandButton>
			<h:commandButton value="#{messages['cancel']}" styleClass="button" action="#{adminMembershipCategoryBean.navListAction}" immediate="true"></h:commandButton>
		</t:panelGrid>
	</t:panelGrid>
	
</rich:panel>
